//让AI能够救人
private _unit = _this select 0;
private _player = objNull;
private _group = group _unit;


while{true} do
{
	sleep 20;
	if(isNull _unit || !alive _unit) exitWith{};
	if(simulationEnabled _unit) then
	{
		//寻找新玩家目标
		if(isNull _player || !alive _player || (_player getVariable ["FAR_isUnconscious", 0] == 0)) then
		{
			_player = objNull;
			{
				if(_x distance _unit < 800 && (_x getVariable ["FAR_isUnconscious", 0] == 1)) exitWith
				{
					_player = _x;
				};
			}forEach (call fn_getPlayerRed);
		};
		
		//systemChat "a";
		if(!isNull _player) then
		{
			//systemChat "b";
			if(_unit distance _player > 1.5) then
			{
				_unit doMove (position _player); //
				_group move (position _player);
				waitUntil {_unit distance _player < 1.5};
				doStop _unit;
				if(_player getVariable ["FAR_isUnconscious", 0] == 1) then
				{
					[_unit, _player] call FAR_Revive_AI;
				};
			};	
		};
	};
};
